﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="/Elysium.Theme;component/Themes/SharedResources.xaml"/>
    </ResourceDictionary.MergedDictionaries>

    <Style x:Key="SelectorsItemsBaseStyle" TargetType="{x:Type ListBoxItem}">

        <Setter Property="Background" Value="{StaticResource Transparent}"/>
        <Setter Property="BorderBrush" Value="{StaticResource ForegroundMiddlelight}"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="Foreground" Value="{Binding RelativeSource={RelativeSource AncestorType={x:Type Selector}}, Path=Foreground}"/>
        <Setter Property="FontFamily" Value="{Binding RelativeSource={RelativeSource AncestorType={x:Type Selector}}, Path=FontFamily}"/>
        <Setter Property="FontSize" Value="{Binding RelativeSource={RelativeSource AncestorType={x:Type Selector}}, Path=FontSize}"/>
        <Setter Property="FontWeight" Value="{Binding RelativeSource={RelativeSource AncestorType={x:Type Selector}}, Path=FontWeight}"/>

        <Setter Property="Focusable" Value="True"/>
        <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisualStyle}"/>

        <Setter Property="HorizontalContentAlignment" Value="{Binding RelativeSource={RelativeSource AncestorType={x:Type Selector}}, Path=HorizontalContentAlignment}"/>
        <Setter Property="VerticalContentAlignment" Value="{Binding RelativeSource={RelativeSource AncestorType={x:Type Selector}}, Path=VerticalContentAlignment}"/>
        <Setter Property="Padding" Value="{Binding RelativeSource={RelativeSource AncestorType={x:Type Selector}}, Path=Padding}"/>

        <Setter Property="OverridesDefaultStyle" Value="True"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ListBoxItem}">
                    <Border Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
                        <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                          VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                          Margin="{TemplateBinding Padding}"/>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        
        <Style.Triggers>            
            <Trigger Property="IsEnabled" Value="False">
                <Setter Property="Foreground" Value="{StaticResource Disabled}"/>
            </Trigger>            
        </Style.Triggers>
        
    </Style>

</ResourceDictionary>